package com.zblibrary.cainetwork.okhttp.api;


import com.zblibrary.cainetwork.okhttp.bean.TestMapBean;
import com.zblibrary.cainetwork.okhttp.bean.TextPostMapBean;
import com.zblibrary.cainetwork.okhttp.bean.TextQuery;
import com.zblibrary.cainetwork.okhttp.bean.UploadPicBean;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import rx.Observable;


/**
 * 描述 :接口地址配置
 *
 * @作者 菜Android
 * @时间 2020年09月8日
 */
public interface NetService {

    //Post map  登陆
    @POST("api/Auth/login")
    @FormUrlEncoded
    Observable<TextPostMapBean> PostTextPostMapBean(@FieldMap Map<String, String> params);

    // Query方式
    @GET("api/picture/lists")
    Observable<TextQuery> GetTextQuery(@Query("token") String token);

    //map 方式
    @GET("api/member/getparrotlists")
    Observable<TestMapBean> GetQueryMap(@QueryMap Map<String, String> params);

    // 上传文件 POST请求
    @POST("api/file/uploadpictures")
    Observable<UploadPicBean> UploadPic(@Body RequestBody body);

}

